package library.gui.dialog;

import javafx.scene.Scene;
import javafx.stage.Stage;
import library.gui.SystemApplication;
import library.gui.component.FunctionalButton;
import library.gui.component.InputList;
import library.gui.component.PostPane;

public class PostDialog extends Stage {
	
	private InputList inputList;
	
	public PostDialog(String title, InputList inputList, FunctionalButton...buttonList) {
		this.setTitle(SystemApplication.TITLE);
		for(var x: buttonList) {
			x.setFinal(this::close);
		}
		PostPane p = new PostPane(title, inputList, buttonList);
		p.setPrefWidth(300);
		this.getIcons().add(SystemApplication.ICON);
		this.setScene(new Scene(p));
		this.sizeToScene();
	}
	
	public InputList getInputList() {
		return inputList;
	}
	
}
